import { makeAutoObservable } from "mobx";

class Counter {
  count = 0;

  constructor() {
    // 将实例上的属性和方法变成响应式的
    makeAutoObservable(this);
  }

  increment(val) {
    this.count += val;
  }
}

export default new Counter();
